/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.web.serviceimpl;

import com.web.dao.AdministratorDao;
import com.web.daoimpl.AdministratorDaoImpl;
import com.web.entity.Administrator;
import com.web.service.AdministratorService;

/**
 *
 * @author lenovo
 */
public class AdministratorServiceImpl  implements AdministratorService{

    AdministratorDao administratorDao =(AdministratorDao)new AdministratorDaoImpl();
    
    @Override
    public Administrator valedateLogin(String Aid, String Apwd) {
        Administrator a =administratorDao.getOneByAid(Aid);
        if(null!=a&&a.getAid().equals(Apwd))
            return a;
        else{
            return null;
        }
    }

    @Override
    public int modifyAdministratorApwd(Administrator a) {
        return administratorDao.updateApwd(a);
    }
    
}
